package com.cloudfun.campusshare.common.security;

import lombok.Data;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by Huqin on 2019/12/23
 */
@Data
public class UserAuthentication implements Authentication {

    private final String userId;
    private final String username;

    private Set<String> roleTypes = new HashSet<>();

    private Set<String> roleIds = new HashSet<>();

    private Boolean viewAllData = false;

    public UserAuthentication(String userId, String username) {
        this.userId = userId;
        this.username = username;
    }


    public UserAuthentication(String userId, String username, Set<String> roleTypes) {
        this.userId = userId;
        this.username = username;
        this.roleTypes = roleTypes;
    }

}
